package com.rds.system.mapper;

import com.rds.common.core.domain.entity.Folder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 管理 数据层
 * @author rds
 */
@Repository
public interface FolderMapper
{

    /**
     * 查找全部数据
     * @return
     */
    List<Folder> list();

    Folder selectRdaFolderById(Long id);

    /**
     * 根据集成过来对象Id查询文件夹
     * @param objectId 集成过来对象Id
     * @return 文件夹
     */
    Folder selectRdaFolderByObjectId(String objectId);

    /**
     * 根据项目文件夹及集成过来对象Id查询文件夹
     * @param objectId 集成过来对象Id
     * @return 文件夹
     */
    Folder selectRdaFolderByPIdAndOId(@Param("projectId")Long projectId,@Param("objectId")String objectId);

    /**
     * 查询管理数据
     *
     * @param folder 信息
     * @return 信息集合
     */
    List<Folder> selectFolderList(Folder folder);

    List<Folder> selectRdaFolderByPId(Long parentid);

    List<Folder> getAllFolderId(long folderId);

    List<Folder> getAllProjectId(long projectId);

    /**
     * 新增folder
     *
     * @param folder folder
     * @return 结果
     */
    public int insertFolder(Folder folder);

    /**
     * 修改command命令
     *
     * @param folder folder
     * @return 结果
     */
    public int updateFolder(Folder folder);

    /**
     * 删除folder
     *
     * @param id ID
     * @return 结果
     */
    public int deleteFolderById(Long id);

    /**
     * 批量删除
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteFolderByIds(Long[] ids);

    Long selectFolderIdByName(@Param("libId") Long libId, @Param("folderName") String folderName);

    /**
     * 根据项目id删除文件夹
     *
     * @param projectId 项目ID
     * @return 项目WBS
     */
    int deleteFolderByprojectId(Long projectId);
	
	    /**
     * 查询管理数据
     *
     * @param folder 信息
     * @return 信息集合
     */
    public List<Folder> selectRdaFolderList(Folder folder);

}
